package cn.demo.client.api;

import cn.demo.common.core.domain.R;
import cn.demo.common.core.domain.entity.SysDept;
import cn.demo.sys.service.ISysDeptService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author xtjun
 * @description 系统接口API
 * @date 2022/09/01
 */
@Tag(name = "系统接口")
@RestController
@RequestMapping("/api/sys")
public class SysApi {

    @Resource
    private ISysDeptService deptService;

    @GetMapping("/deptList")
    @Operation(summary = "部门列表")
    public R<List<SysDept>> deptList(SysDept sysDept) {
        return R.ok(deptService.selectDeptList(sysDept));
    }


}
